home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / mouse.h.z / mouse.h
C/C++ Source or Header  |  1992-04-03  |  2KB  |  67 lines

  1. #ifndef MS_H
  2. #define MS_H 1
  3.  
  4. #define    MS_TYPE            "MOUSE"
  5. #define    MS_NAME            "mouse"
  6. #define    MS_NUM_BUTTONS        3
  7.  
  8. #define    MS_NUM_VALUATORS     2
  9. #define    MS_VALUATOR_MIN        0
  10. #define    MS_VALUATOR_MAX        65000
  11. #define    MS_VALUATOR_RESOLUTION        200
  12. #define    MS_VALUATOR_MIN_RESOLUTION    200
  13. #define    MS_VALUATOR_MAX_RESOLUTION    200
  14.  
  15. /* bits from mouse indicating button pressed */
  16. #define RGTBUTTON 0x1
  17. #define MIDBUTTON 0x2
  18. #define LFTBUTTON 0x4
  19. #define ALLBUTTONS ( LFTBUTTON | MIDBUTTON | RGTBUTTON )
  20.  
  21. /* State machine states */
  22. #define MS_BUT_STATE 0
  23. #define MS_DX1_STATE 1
  24. #define MS_DY1_STATE 2
  25. #define MS_DX2_STATE 3
  26. #define MS_DY2_STATE 4
  27. #define MS_LAST_STATE 5
  28. #define    SZ_MOUSE_STATES    8
  29. #define    MS_STATE_MASK 0x7
  30.  
  31. #ifdef _KERNEL
  32. typedef struct ms_state {
  33.     idevInfo        info;
  34.  
  35.     idevValuatorDesc    vdesc[MS_NUM_VALUATORS];
  36.     idevTransform        vtrans[MS_NUM_VALUATORS];
  37.  
  38.     unsigned char        vactive;
  39.     int            vstate[MS_NUM_VALUATORS];
  40.  
  41.     unsigned char        bactive;
  42.     unsigned char        bstate;
  43.  
  44.     /* "Warp" Variable Accelerators */
  45.     unsigned char        m1;
  46.     unsigned char        cM;
  47.     unsigned char        inflection;
  48.     unsigned char        threshold;
  49.     unsigned short int    acceleratorN;
  50.     unsigned short int    acceleratorD;
  51.     int            currentX;
  52.     int            currentY;
  53.  
  54.     unsigned        state;
  55.     signed char        report[SZ_MOUSE_STATES];
  56.  
  57.     /* Misc. Std. Driver stuff */
  58.     unsigned char initialized;/* true if data structures are set */
  59.                 /* and init sequence has been sent to */
  60.                 /* device */
  61.     unsigned char ready;    /* true if we've received confirmation */
  62.                 /* of the init sequence from the device */
  63. } ms_state_t;
  64. #endif /* _KERNEL */
  65.  
  66. #endif
  67.